package com.ruoyi.business.service;

import java.util.List;
import com.ruoyi.business.domain.JtOrder;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.transaction.annotation.Transactional;

/**
 * 订单Service接口
 * 
 * @author Alan Zhang
 * @date 2025-03-29
 */
public interface IJtOrderService 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单 明细
     */
    public JtOrder selectJtOrderByOrderId(Long orderId);

    /**
     * 查询订单
     *
     * @param orderId 订单主键
     * @return 订单
     */
    public JtOrder selectOrderInfoByOrderId(Long orderId);

    /**
     * 查询订单
     *
     * @param orderNo 订单号
     * @return 订单
     */
    public JtOrder selectJtOrderByOrderNo(String orderNo);

    /**
     * 查询订单列表
     * 
     * @param jtOrder 订单
     * @return 订单集合
     */
    public List<JtOrder> selectJtOrderList(JtOrder jtOrder);

    /**
     * 查询订单列表
     *
     * @param jtOrder 订单
     * @return 订单集合
     */
    public List<JtOrder> selectJtOrderAndItemList(JtOrder jtOrder);

    /**
     * 新增订单
     * 
     * @param jtOrder 订单
     * @return 结果
     */
    public int insertJtOrder(JtOrder jtOrder);

    /**
     * 修改订单
     * 
     * @param jtOrder 订单
     * @return 结果
     */
    public int updateJtOrder(JtOrder jtOrder);

    /**
     * 修改订单
     *
     * @param jtOrder 订单
     * @return 结果
     */
    public int editJtOrder(JtOrder jtOrder);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteJtOrderByOrderIds(String orderIds);

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteJtOrderByOrderId(Long orderId);

    /**
     * 订单发货
     * @param jtOrder
     * @return
     */
    public AjaxResult delivery(JtOrder jtOrder);

    /**
     * 手工支付 订单信息
     * Manual payment
     * @param jtOrder 订单
     * @return 结果
     */
    public AjaxResult manualPayment(JtOrder jtOrder, String transactionNo);

    /**
     * 统计订单数
     * @param startDate
     * @param endDate
     * @return
     */
    public Long selectOrderCount(String startDate, String endDate);
}
